aboutsummaryrefslogtreecommitdiff
path: root/web/pw-server/src/routes/bots/[bot_name]/__layout.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'web/pw-server/src/routes/bots/[bot_name]/__layout.svelte')
-rw-r--r--web/pw-server/src/routes/bots/[bot_name]/__layout.svelte5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/pw-server/src/routes/bots/[bot_name]/__layout.svelte b/web/pw-server/src/routes/bots/[bot_name]/__layout.svelte
index baa8f99..f445cbb 100644
--- a/web/pw-server/src/routes/bots/[bot_name]/__layout.svelte
+++ b/web/pw-server/src/routes/bots/[bot_name]/__layout.svelte
@@ -16,6 +16,8 @@
</script>
<script lang="ts">
+ import { currentUser } from "$lib/stores/current_user";
+
export let bot;
export let owner;
</script>
@@ -36,6 +38,9 @@
<a class="bot-tab" href={`/bots/${bot.name}`}>index</a>
<a class="bot-tab" href={`/bots/${bot.name}/matches`}>matches</a>
<a class="bot-tab" href={`/bots/${bot.name}/stats`}>stats</a>
+ {#if $currentUser && $currentUser["user_id"] === bot["owner_id"]}
+ <a class="bot-tab" href={`/bots/${bot.name}/versions`}>versions</a>
+ {/if}
</div>
</div>
<slot />